package org.example.javachatroom.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.example.javachatroom.model.AddFriendRequest;
import org.example.javachatroom.model.Friend;

import java.util.List;

@Mapper
public interface FriendMapper {
    List<Friend> selectFriendList(int userId);

    void addFriendRequesy(int fromUserId, int toUserId, String reason);

    List<AddFriendRequest> getFriendRequest(int toUserId);

    void deleteFriendRequest(int toUserId, int fromUserId);

    void addFriend(int friendId, int userId);

    //找出包含friendName的用户信息，抛出掉selfUserId本身和他的好友
    List<Friend> findFriend(int selfUserId, String friendName);
}
